<style scoped>
/* 进入/显示的动画 */
.bounce-enter-active {
  animation: bounce-in .5s;
}
  /* 离开/隐藏的动画 */
.bounce-leave-active {
  animation: bounce-in .5s reverse;
}
@keyframes bounce-in {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}

p {
  /* background: red; */
  display: inline-block;
}
</style>


<template>
  <div id="example-2">
    <button @click="show = !show">Toggle show</button><br>
    <transition name="bounce">
      <p v-if="show">Lorem ipsum</p>
    </transition>
  </div>
</template>

<script>
export default {
  name: 'App',
  data () {
    return {
      show: true
    }
  }
}
</script>

